package org.jeecg.modules.demo.pointcount.redis.thread.work;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.pointcount.entity.EventData;
import org.jeecg.modules.demo.pointcount.redis.consumer.SendAndStorageProcess;
import org.jeecg.modules.demo.pointcount.service.IEventDataService;

/**
 * @Author yw
 * @Date 2021/3/16 9:11
 */
@Slf4j
public class AddEventDataTask implements Runnable{
    //private static Logger logger = Logger.getLogger(EventData.class);

    private static SendAndStorageProcess sendAndStorageProcess;

    IEventDataService eventDataService;

    public AddEventDataTask(IEventDataService eventDataService,EventData data){
        this.data = data;
        this.eventDataService=eventDataService;
    }



    private EventData data;

    public AddEventDataTask(EventData data){
        this.data = data;
    }

    public void run() {
        this.eventDataService.insertEventData(data);
    }
}
